package com.pactera.madp.cp.mapper.marketing;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pactera.madp.cp.api.entity.marketing.MarketingHotEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Auther: yuShen.qi
 * @Date: 2021/5/25 16:25
 * @Description:
 */
@Repository
public interface MarketingHotMapper extends BaseMapper<MarketingHotEntity> {

    /**
     * 返回发送次数排序
     *
     * @param corpId
     * @return
     */
    List<Map> allListBySend(@Param(value = "corpId") Integer corpId,@Param(value = "hotUuid")String hotUuid);

    List<Map> allListBySendWechat(@Param(value = "corpId") Integer corpId,@Param(value = "title")String title,@Param(value = "hotUuid")String hotUuid);

    /**
     * 返回打开次数排序
     *
     * @param corpId
     * @return
     */
    List<Map> allListByOpenWechat(@Param(value = "corpId") Integer corpId,@Param(value = "title")String title,@Param(value = "hotUuid")String hotUuid);

    List<Map> allListByOpen(@Param(value = "corpId") Integer corpId,@Param(value = "hotUuid")String hotUuid);

    /**
     * 根据类型返回发送次数排序
     *
     * @param corpId
     * @return
     */
    List<Map> listByChooseBySend(@Param(value = "corpId") Integer corpId);

    /**
     * 根据类型返回打开次数排序
     *
     * @param corpId
     * @return
     */
    List<Map> listByChooseByOpen(@Param(value = "corpId") Integer corpId);

}
